/**
 * 添加或者修改页面 Add or Edit Page
 */
var WhOutOrderInfoDlg = {
    data: {
        outOrderStatus: "",
        outOrderNumber: "",
        outCustomerId: "",
        outCustomerName: "",
        customerNumber: "",
        saleDeliveryCompany: "",
        settlementUnit: "",
        outTime: "",
        outWay: "",
        transportWay: "",
        outStorehouseId: "",
        storehouseName: "",
        settlementWay: "",
        carNumber: "",
        setUnitId: "",
        setUnit: "",
        setLocation: "",
        setLocationid: "",
        setPeople: "",
        setTel: "",
        setMentiontime: "",
        salesman: "",
        salesmanTel: "",
        getUnitid: "",
        getUnit: "",
        getLocation: "",
        getLocationid: "",
        getPeople: "",
        getTel: "",
        getMentiontime: "",
        version: "",
        deptId: "",
        deliverId: "",
        note: "",
        returnNote: "",
        createTime: "",
        updateTime: "",
        submitTime: "",
        examineTime: "",
        startOutTime: "",
        finishOutTime: "",
        createUser: "",
        updateUser: "",
        submitter: "",
        examineUser: "",
        startOutUser: "",
        finishOutUser: "",
        createUserName: "",
        updateUserName: "",
        submitterName: "",
        examineName: "",
        startOutUserName: "",
        finishOutUserName: "",
        cactoryNumber: "",
        cactoryName: "",
        turnNumber: "",
        hairDate: "",
        transportNumber: "",
        procurementNumber: "",
        kilometer: "",
        expressDelivery: ""
    }
};

layui.use(['form', 'admin', 'ax'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var admin = layui.admin;

    //让当前iframe弹层高度适应 Adjust iframe height
    admin.iframeAuto();

    //表单提交事件 Form submission event
    form.on('submit(btnSubmit)', function (data) {
        var ajax = new $ax(Feng.ctxPath + "/whOutOrder/addItem", function (data) {
            Feng.success("添加成功！Add successful!");
            window.location.href = Feng.ctxPath + '/whOutOrder'
        }, function (data) {
            Feng.error("添加失败！Add failed!" + data.responseJSON.message)
        });
        ajax.set(data.field);
        ajax.start();

        return false;
    });

    //返回按钮 Back button
    $("#backupPage").click(function () {
        window.location.href = Feng.ctxPath + '/whOutOrder'
    });

});